<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>html版</title>
		<script type="text/javascript">
			function createReq(){
				var xmlhttp;
				if(window.XMLHttpRequest){
					xmlhttp = new XMLHttpRequest();
				}else{
					xmlhttp = new ActiveXObject();
				}
				return xmlhttp;
			}
			
			var xmlReq = null;
			url = 'chaxun.html';
			
			function queryRes(){
				xmlReq = createReq();
				xmlReq.onreadystatechange = state_Change;
				xmlReq.open('GET',url,true);
				xmlReq.send(null);
			}
			
			function state_Change(){
				if(xmlReq.readyState == 4 ){
					if(xmlReq.status == 200){
						document.getElementById('res').innerHTML = xmlReq.responseText;
					}else{
						alert('系统忙，请稍后重试');
					}
				}
			}
			
		</script>
		
	</head>
	<body>
		<form method="post">
			<label for="search">学号</label><input type="text" name="search" id="search" value="" />
			<input type="button" value="查询" onclick="queryRes()"/>
			<div id="res">
				
			</div>
		</form>
	</body>
</html>
